package com.ccp.dev.system.model;

import com.ccp.dev.core.basic.api.IPosition;
import com.ccp.dev.core.basic.model.BaseModel;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/**
 * 系统岗位表，实际是部门和职务的对应关系表 Model对象
 * @author y
 */
public class Position extends BaseModel implements IPosition
{
	/**
	 * 岗位id
	 */
	private String  posId;
	/**
	 * 岗位名称
	 */
	private String  posName;
	/**
	 * POSDESC
	 */
	private String  posDesc;
	/**
	 * 岗位代码
	 */
	private String posCode;
	/**
	 * 组织id
	 */
	private String  orgId;
	/**
	 * 职位id
	 */
	private String  jobId;
	/**
	 * 是否删除
	 */
	private Long  isDelete=0L;
	
	private Short isPrimary;
	/**
	 * 所属组织代码(表中没有此字段)
	 */
	private String orgCode;
	/**
	 * 所属职务代码(表中没有此字段)
	 */
	private String jobCode;

	/**
	 * 组织名称，表中没有此字段
	 */
	private String  orgName;

	/**
	 * 用户名字符串，表中没有此字段,岗位下所有用户拼接字符串
	 */
	private String  userNames;

	/**
	 * 职务名称，表中没有此字段
	 */
	private String  jobName;

	/**
	 * 职务等级，表中没有此字段
	 */
	private String  jobGradeName;

	/**
	 * 公司名称，表中没有此字段
	 */
	private String company;

	/**
	 * 公司id，表中没有此字段
	 */
	private String companyId;
		
	public String getUserNames() {
		return userNames;
	}

	public void setUserNames(String userNames) {
		this.userNames = userNames;
	}

	public String getJobName() {
		return jobName;
	}

	public void setJobName(String jobName) {
		this.jobName = jobName;
	}



   	public String getOrgName() {
		return orgName;
	}

	public void setOrgName(String orgName) {
		this.orgName = orgName;
	}

	public Short getIsPrimary() {
		return isPrimary;
	}

	public void setIsPrimary(Short isPrimary) {
		this.isPrimary = isPrimary;
	}

	@Override
	public String getPosName() {
		return posName;
	}
	@Override
	public void setPosName(String posName) {
		this.posName = posName;
	}
	@Override
	public String getPosDesc() {
		return posDesc;
	}
	@Override
	public void setPosDesc(String posDesc) {
		this.posDesc = posDesc;
	}
	public Long getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(Long isDelete) {
		this.isDelete = isDelete;
	}
	@Override
	public String getPosCode() {
		return posCode;
	}
	@Override
	public void setPosCode(String posCode) {
		this.posCode = posCode;
	}

	@Override
	public String getPosId() {
		return posId;
	}
	@Override
	public void setPosId(String posId) {
		this.posId = posId;
	}

	@Override
	public String getOrgId() {
		return orgId;
	}
	@Override
	public void setOrgId(String orgId) {
		this.orgId = orgId;
	}

	@Override
	public String getJobId() {
		return jobId;
	}
	@Override
	public void setJobId(String jobId) {
		this.jobId = jobId;
	}

	public String getCompanyId() {
		return companyId;
	}

	public void setCompanyId(String companyId) {
		this.companyId = companyId;
	}

	public String getOrgCode() {
		return orgCode;
	}

	public void setOrgCode(String orgCode) {
		this.orgCode = orgCode;
	}

	public String getJobCode() {
		return jobCode;
	}

	public void setJobCode(String jobCode) {
		this.jobCode = jobCode;
	}
	
	public String getJobGradeName() {
		return jobGradeName;
	}

	public void setJobGradeName(String jobGradeName) {
		this.jobGradeName = jobGradeName;
	}

	public String getCompany() {
		return company;
	}

	public void setCompany(String company) {
		this.company = company;
	}

	/**
	 * @see Object#equals(Object)
	 */
	@Override
	public boolean equals(Object object)
	{
		if (!(object instanceof Position))
		{
			return false;
		}
		Position rhs = (Position) object;
		return new EqualsBuilder()
		.append(this.posId, rhs.posId)
		.append(this.posName, rhs.posName)
		.append(this.posDesc, rhs.posDesc)
		.append(this.orgId, rhs.orgId)
		.append(this.jobId, rhs.jobId)
		.append(this.isDelete, rhs.isDelete)
		.isEquals();
	}

	/**
	 * @see Object#hashCode()
	 */
	@Override
	public int hashCode()
	{
		return new HashCodeBuilder(-82280557, -700257973)
		.append(this.posId)
		.append(this.posName)
		.append(this.posDesc)
		.append(this.orgId)
		.append(this.jobId)
		.append(this.isDelete)
		.toHashCode();
	}

	/**
	 * @see Object#toString()
	 */
	@Override
	public String toString() 
	{
		return new ToStringBuilder(this)
		.append("posId", this.posId) 
		.append("posName", this.posName) 
		.append("posDesc", this.posDesc) 
		.append("orgId", this.orgId) 
		.append("jobId", this.jobId) 
		.append("isDelete", this.isDelete) 
		.toString();
	}
}